<%@ page language="java" contentType="text/html; charset=gb2312"
    pageEncoding="gb2312"%>
    
<%@ taglib uri="/struts-tags" prefix="s" %>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>list ALL</title>

<script type="text/javascript">

	function del()
	{
		if(confirm("Are you sure?"))
			return true;
		else
			return false;
	}
	
</script>


</head>
<body>

	<table width="80%" border="1" align="center">
	
	<tr>
	 	<th> username </th>
	
	 	<th> password </th>
	 
	 	<th> age </th>
	 
	 	<th> registerDate </th>

		<th> update </th>
		
		<th> delete </th>
	</tr>
	
	<s:iterator value="#request.list" id="person">
	
	<tr>
		<td>
		<s:a href="getPerson.action?id=%{#person.id}">
		<s:property value="username"/>
		</s:a>
		</td>
		
		<td>
	    <s:property value="password"/>
		</td>
		
		<td>
	    <s:property value="age"/>
		</td>
		
		<td>
	    <s:property value="registerdate"/>
		</td>
		
		<td>
		<s:a href="updatePPerson.action?id=%{#person.id}">
	    update
	    </s:a>
		</td>
		
		<td>
		<s:a href="deletePerson.action?id=%{#person.id}" onchange="return del();">
	    delete
	    </s:a>
		</td>
	</tr>
	
	</s:iterator>
	
	</table>


</body>
</html>